package alo;

import java.io.Serializable;
import java.util.Scanner;
import java.util.concurrent.Callable;

/**
 * @ClassName test1
 * @Description TODO
 * @Author Fanxc
 * @DATE 2021/4/12 9:38
 * @Version 1.0
 */
public class test2 {

    public static void test(int n,int m){
        int count=0;
        for (int i = n; i <= m ; i++) {
            int a=i%10;
            int b=i/10;
            int c=b%10;
            int d=b/10;
            if(pd(i,a,c,d)){
                count++;
                System.out.print(i);
                System.out.print(" ");
            }
        }
        if (count==0){
            System.out.print("no");
        }
    }

    private static boolean pd(int i, int a, int c, int d) {
        if(Math.pow(a,3)+Math.pow(c,3)+Math.pow(d,3)==i)return true;
        return false;
    }

    public static void main(String args[]){
        int m,n;
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            n=sc.nextInt();
            m=sc.nextInt();
            test(n,m);
            System.out.println();
        }
    }

}
